package com.chinar.funds;

import java.io.Serializable;
import java.util.Objects;

public class Fund implements Serializable {
    private String code;
    private String name;
    private String estimate;
    private String yesterdayNetValue;

    public Fund(String code, String name, String estimate, String yesterdayNetValue) {
        this.code = code;
        this.name = name;
        this.estimate = estimate;
        this.yesterdayNetValue = yesterdayNetValue;
    }

    // Getters and Setters
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEstimate() {
        return estimate;
    }

    public void setEstimate(String estimate) {
        this.estimate = estimate;
    }

    public String getYesterdayNetValue() {
        return yesterdayNetValue;
    }

    public void setYesterdayNetValue(String yesterdayNetValue) {
        this.yesterdayNetValue = yesterdayNetValue;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Fund fund = (Fund) o;
        return Objects.equals(code, fund.code);
    }

    @Override
    public int hashCode() {
        return Objects.hash(code);
    }
}